package com.qfjy.homework.gongzhenyun;

/**
 * 被代理类
 * @author : gzy
 * @version : 1.0
 * @date : 2022/11/10 20:28
 */
public class RealImage implements Image{

    private String fileName;

    public RealImage(String fileName){
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }

    private void loadFromDisk(String fileName){
        System.out.println("Loading " + fileName);
    }

}
